INSERT
INTO
c1_department
(<#assign prefixName = true>
<#if (insert_address??) && (insert_address_value??)>
${prefixName?string('  ', ', ')}address
<#assign prefixName = false>
</#if>
<#if (insert_areaCode??) && (insert_areaCode_value??)>
${prefixName?string('  ', ', ')}area_code
<#assign prefixName = false>
</#if>
<#if (insert_batchNo??) && (insert_batchNo_value??)>
${prefixName?string('  ', ', ')}batch_no
<#assign prefixName = false>
</#if>
<#if (insert_beginDate??) && (insert_beginDate_value??)>
${prefixName?string('  ', ', ')}begin_date
<#assign prefixName = false>
</#if>
<#if (insert_cityCode??) && (insert_cityCode_value??)>
${prefixName?string('  ', ', ')}city_code
<#assign prefixName = false>
</#if>
<#if (insert_compatibleDepartmentCode1??) && (insert_compatibleDepartmentCode1_value??)>
${prefixName?string('  ', ', ')}compatible_department_code_1
<#assign prefixName = false>
</#if>
<#if (insert_compatibleDepartmentCode2??) && (insert_compatibleDepartmentCode2_value??)>
${prefixName?string('  ', ', ')}compatible_department_code_2
<#assign prefixName = false>
</#if>
<#if (insert_compatibleParentCode1??) && (insert_compatibleParentCode1_value??)>
${prefixName?string('  ', ', ')}compatible_parent_code_1
<#assign prefixName = false>
</#if>
<#if (insert_compatibleParentCode2??) && (insert_compatibleParentCode2_value??)>
${prefixName?string('  ', ', ')}compatible_parent_code_2
<#assign prefixName = false>
</#if>
<#if (insert_createdByCode??) && (insert_createdByCode_value??)>
${prefixName?string('  ', ', ')}created_by_code
<#assign prefixName = false>
</#if>
<#if (insert_createdById??) && (insert_createdById_value??)>
${prefixName?string('  ', ', ')}created_by_id
<#assign prefixName = false>
</#if>
<#if (insert_createdDate??) && (insert_createdDate_value??)>
${prefixName?string('  ', ', ')}created_date
<#assign prefixName = false>
</#if>
<#if (insert_dataStateCode??) && (insert_dataStateCode_value??)>
${prefixName?string('  ', ', ')}data_state_code
<#assign prefixName = false>
</#if>
<#if (insert_departmentCode??) && (insert_departmentCode_value??)>
${prefixName?string('  ', ', ')}department_code
<#assign prefixName = false>
</#if>
<#if (insert_departmentId??) && (insert_departmentId_value??)>
${prefixName?string('  ', ', ')}department_id
<#assign prefixName = false>
</#if>
<#if (insert_endDate??) && (insert_endDate_value??)>
${prefixName?string('  ', ', ')}end_date
<#assign prefixName = false>
</#if>
<#if (insert_flagCode??) && (insert_flagCode_value??)>
${prefixName?string('  ', ', ')}flag_code
<#assign prefixName = false>
</#if>
<#if (insert_flagObjectCode??) && (insert_flagObjectCode_value??)>
${prefixName?string('  ', ', ')}flag_object_code
<#assign prefixName = false>
</#if>
<#if (insert_jsonData??) && (insert_jsonData_value??)>
${prefixName?string('  ', ', ')}json_data
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedByCode??) && (insert_lastModifiedByCode_value??)>
${prefixName?string('  ', ', ')}last_modified_by_code
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedById??) && (insert_lastModifiedById_value??)>
${prefixName?string('  ', ', ')}last_modified_by_id
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedDate??) && (insert_lastModifiedDate_value??)>
${prefixName?string('  ', ', ')}last_modified_date
<#assign prefixName = false>
</#if>
<#if (insert_lastSyncTime??) && (insert_lastSyncTime_value??)>
${prefixName?string('  ', ', ')}last_sync_time
<#assign prefixName = false>
</#if>
<#if (insert_name??) && (insert_name_value??)>
${prefixName?string('  ', ', ')}name
<#assign prefixName = false>
</#if>
<#if (insert_orderBy??) && (insert_orderBy_value??)>
${prefixName?string('  ', ', ')}order_by_
<#assign prefixName = false>
</#if>
<#if (insert_orgCode??) && (insert_orgCode_value??)>
${prefixName?string('  ', ', ')}org_code
<#assign prefixName = false>
</#if>
<#if (insert_orgId??) && (insert_orgId_value??)>
${prefixName?string('  ', ', ')}org_id
<#assign prefixName = false>
</#if>
<#if (insert_parentCode??) && (insert_parentCode_value??)>
${prefixName?string('  ', ', ')}parent_code
<#assign prefixName = false>
</#if>
<#if (insert_parentId??) && (insert_parentId_value??)>
${prefixName?string('  ', ', ')}parent_id
<#assign prefixName = false>
</#if>
<#if (insert_parentTreeCode??) && (insert_parentTreeCode_value??)>
${prefixName?string('  ', ', ')}parent_tree_code
<#assign prefixName = false>
</#if>
<#if (insert_parentTreeId??) && (insert_parentTreeId_value??)>
${prefixName?string('  ', ', ')}parent_tree_id
<#assign prefixName = false>
</#if>
<#if (insert_parentTreeName??) && (insert_parentTreeName_value??)>
${prefixName?string('  ', ', ')}parent_tree_name
<#assign prefixName = false>
</#if>
<#if (insert_personalCode??) && (insert_personalCode_value??)>
${prefixName?string('  ', ', ')}personal_code
<#assign prefixName = false>
</#if>
<#if (insert_personalId??) && (insert_personalId_value??)>
${prefixName?string('  ', ', ')}personal_id
<#assign prefixName = false>
</#if>
<#if (insert_provinceCode??) && (insert_provinceCode_value??)>
${prefixName?string('  ', ', ')}province_code
<#assign prefixName = false>
</#if>
<#if (insert_regionCode??) && (insert_regionCode_value??)>
${prefixName?string('  ', ', ')}region_code
<#assign prefixName = false>
</#if>
<#if (insert_siteCode??) && (insert_siteCode_value??)>
${prefixName?string('  ', ', ')}site_code
<#assign prefixName = false>
</#if>
<#if (insert_sourceCode??) && (insert_sourceCode_value??)>
${prefixName?string('  ', ', ')}source_code
<#assign prefixName = false>
</#if>
<#if (insert_stateCode??) && (insert_stateCode_value??)>
${prefixName?string('  ', ', ')}state_code
<#assign prefixName = false>
</#if>
<#if (insert_syncReturnCode??) && (insert_syncReturnCode_value??)>
${prefixName?string('  ', ', ')}sync_return_code
<#assign prefixName = false>
</#if>
<#if (insert_syncReturnMessage??) && (insert_syncReturnMessage_value??)>
${prefixName?string('  ', ', ')}sync_return_message
<#assign prefixName = false>
</#if>
<#if (insert_systemInfoCode??) && (insert_systemInfoCode_value??)>
${prefixName?string('  ', ', ')}system_info_code
<#assign prefixName = false>
</#if>
<#if (insert_thirdPartyCode??) && (insert_thirdPartyCode_value??)>
${prefixName?string('  ', ', ')}third_party_code
<#assign prefixName = false>
</#if>
<#if (insert_version??) && (insert_version_value??)>
${prefixName?string('  ', ', ')}version_
<#assign prefixName = false>
</#if>
)
(SELECT
<#assign prefixName = true>
<#if (insert_address??) && (insert_address_value??)>
${prefixName?string('  ', ', ')}:insert_address_value
<#assign prefixName = false>
</#if>
<#if (insert_areaCode??) && (insert_areaCode_value??)>
${prefixName?string('  ', ', ')}:insert_areaCode_value
<#assign prefixName = false>
</#if>
<#if (insert_batchNo??) && (insert_batchNo_value??)>
${prefixName?string('  ', ', ')}:insert_batchNo_value
<#assign prefixName = false>
</#if>
<#if (insert_beginDate??) && (insert_beginDate_value??)>
${prefixName?string('  ', ', ')}:insert_beginDate_value
<#assign prefixName = false>
</#if>
<#if (insert_cityCode??) && (insert_cityCode_value??)>
${prefixName?string('  ', ', ')}:insert_cityCode_value
<#assign prefixName = false>
</#if>
<#if (insert_compatibleDepartmentCode1??) && (insert_compatibleDepartmentCode1_value??)>
${prefixName?string('  ', ', ')}:insert_compatibleDepartmentCode1_value
<#assign prefixName = false>
</#if>
<#if (insert_compatibleDepartmentCode2??) && (insert_compatibleDepartmentCode2_value??)>
${prefixName?string('  ', ', ')}:insert_compatibleDepartmentCode2_value
<#assign prefixName = false>
</#if>
<#if (insert_compatibleParentCode1??) && (insert_compatibleParentCode1_value??)>
${prefixName?string('  ', ', ')}:insert_compatibleParentCode1_value
<#assign prefixName = false>
</#if>
<#if (insert_compatibleParentCode2??) && (insert_compatibleParentCode2_value??)>
${prefixName?string('  ', ', ')}:insert_compatibleParentCode2_value
<#assign prefixName = false>
</#if>
<#if (insert_createdByCode??) && (insert_createdByCode_value??)>
${prefixName?string('  ', ', ')}:insert_createdByCode_value
<#assign prefixName = false>
</#if>
<#if (insert_createdById??) && (insert_createdById_value??)>
${prefixName?string('  ', ', ')}:insert_createdById_value
<#assign prefixName = false>
</#if>
<#if (insert_createdDate??) && (insert_createdDate_value??)>
${prefixName?string('  ', ', ')}:insert_createdDate_value
<#assign prefixName = false>
</#if>
<#if (insert_dataStateCode??) && (insert_dataStateCode_value??)>
${prefixName?string('  ', ', ')}:insert_dataStateCode_value
<#assign prefixName = false>
</#if>
<#if (insert_departmentCode??) && (insert_departmentCode_value??)>
${prefixName?string('  ', ', ')}:insert_departmentCode_value
<#assign prefixName = false>
</#if>
<#if (insert_departmentId??) && (insert_departmentId_value??)>
${prefixName?string('  ', ', ')}:insert_departmentId_value
<#assign prefixName = false>
</#if>
<#if (insert_endDate??) && (insert_endDate_value??)>
${prefixName?string('  ', ', ')}:insert_endDate_value
<#assign prefixName = false>
</#if>
<#if (insert_flagCode??) && (insert_flagCode_value??)>
${prefixName?string('  ', ', ')}:insert_flagCode_value
<#assign prefixName = false>
</#if>
<#if (insert_flagObjectCode??) && (insert_flagObjectCode_value??)>
${prefixName?string('  ', ', ')}:insert_flagObjectCode_value
<#assign prefixName = false>
</#if>
<#if (insert_jsonData??) && (insert_jsonData_value??)>
${prefixName?string('  ', ', ')}:insert_jsonData_value
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedByCode??) && (insert_lastModifiedByCode_value??)>
${prefixName?string('  ', ', ')}:insert_lastModifiedByCode_value
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedById??) && (insert_lastModifiedById_value??)>
${prefixName?string('  ', ', ')}:insert_lastModifiedById_value
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedDate??) && (insert_lastModifiedDate_value??)>
${prefixName?string('  ', ', ')}:insert_lastModifiedDate_value
<#assign prefixName = false>
</#if>
<#if (insert_lastSyncTime??) && (insert_lastSyncTime_value??)>
${prefixName?string('  ', ', ')}:insert_lastSyncTime_value
<#assign prefixName = false>
</#if>
<#if (insert_name??) && (insert_name_value??)>
${prefixName?string('  ', ', ')}:insert_name_value
<#assign prefixName = false>
</#if>
<#if (insert_orderBy??) && (insert_orderBy_value??)>
${prefixName?string('  ', ', ')}:insert_orderBy_value
<#assign prefixName = false>
</#if>
<#if (insert_orgCode??) && (insert_orgCode_value??)>
${prefixName?string('  ', ', ')}:insert_orgCode_value
<#assign prefixName = false>
</#if>
<#if (insert_orgId??) && (insert_orgId_value??)>
${prefixName?string('  ', ', ')}:insert_orgId_value
<#assign prefixName = false>
</#if>
<#if (insert_parentCode??) && (insert_parentCode_value??)>
${prefixName?string('  ', ', ')}:insert_parentCode_value
<#assign prefixName = false>
</#if>
<#if (insert_parentId??) && (insert_parentId_value??)>
${prefixName?string('  ', ', ')}:insert_parentId_value
<#assign prefixName = false>
</#if>
<#if (insert_parentTreeCode??) && (insert_parentTreeCode_value??)>
${prefixName?string('  ', ', ')}:insert_parentTreeCode_value
<#assign prefixName = false>
</#if>
<#if (insert_parentTreeId??) && (insert_parentTreeId_value??)>
${prefixName?string('  ', ', ')}:insert_parentTreeId_value
<#assign prefixName = false>
</#if>
<#if (insert_parentTreeName??) && (insert_parentTreeName_value??)>
${prefixName?string('  ', ', ')}:insert_parentTreeName_value
<#assign prefixName = false>
</#if>
<#if (insert_personalCode??) && (insert_personalCode_value??)>
${prefixName?string('  ', ', ')}:insert_personalCode_value
<#assign prefixName = false>
</#if>
<#if (insert_personalId??) && (insert_personalId_value??)>
${prefixName?string('  ', ', ')}:insert_personalId_value
<#assign prefixName = false>
</#if>
<#if (insert_provinceCode??) && (insert_provinceCode_value??)>
${prefixName?string('  ', ', ')}:insert_provinceCode_value
<#assign prefixName = false>
</#if>
<#if (insert_regionCode??) && (insert_regionCode_value??)>
${prefixName?string('  ', ', ')}:insert_regionCode_value
<#assign prefixName = false>
</#if>
<#if (insert_siteCode??) && (insert_siteCode_value??)>
${prefixName?string('  ', ', ')}:insert_siteCode_value
<#assign prefixName = false>
</#if>
<#if (insert_sourceCode??) && (insert_sourceCode_value??)>
${prefixName?string('  ', ', ')}:insert_sourceCode_value
<#assign prefixName = false>
</#if>
<#if (insert_stateCode??) && (insert_stateCode_value??)>
${prefixName?string('  ', ', ')}:insert_stateCode_value
<#assign prefixName = false>
</#if>
<#if (insert_syncReturnCode??) && (insert_syncReturnCode_value??)>
${prefixName?string('  ', ', ')}:insert_syncReturnCode_value
<#assign prefixName = false>
</#if>
<#if (insert_syncReturnMessage??) && (insert_syncReturnMessage_value??)>
${prefixName?string('  ', ', ')}:insert_syncReturnMessage_value
<#assign prefixName = false>
</#if>
<#if (insert_systemInfoCode??) && (insert_systemInfoCode_value??)>
${prefixName?string('  ', ', ')}:insert_systemInfoCode_value
<#assign prefixName = false>
</#if>
<#if (insert_thirdPartyCode??) && (insert_thirdPartyCode_value??)>
${prefixName?string('  ', ', ')}:insert_thirdPartyCode_value
<#assign prefixName = false>
</#if>
<#if (insert_version??) && (insert_version_value??)>
${prefixName?string('  ', ', ')}:insert_version_value
<#assign prefixName = false>
</#if>
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM c1_department E
<#assign prefixName = true>
<#if (where_and_eq_address??)>
<#if (where_and_eq_address_value??)>
${prefixName?string('WHERE ', 'AND ')}E.address = :where_and_eq_address_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.address IS NULL OR E.address = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_areaCode??)>
<#if (where_and_eq_areaCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.area_code = :where_and_eq_areaCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.area_code IS NULL OR E.area_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_batchNo??)>
<#if (where_and_eq_batchNo_value??)>
${prefixName?string('WHERE ', 'AND ')}E.batch_no = :where_and_eq_batchNo_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.batch_no IS NULL OR E.batch_no = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_beginDate??)>
<#if (where_and_eq_beginDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.begin_date = :where_and_eq_beginDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.begin_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_cityCode??)>
<#if (where_and_eq_cityCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.city_code = :where_and_eq_cityCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.city_code IS NULL OR E.city_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_compatibleDepartmentCode1??)>
<#if (where_and_eq_compatibleDepartmentCode1_value??)>
${prefixName?string('WHERE ', 'AND ')}E.compatible_department_code_1 = :where_and_eq_compatibleDepartmentCode1_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.compatible_department_code_1 IS NULL OR E.compatible_department_code_1 = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_compatibleDepartmentCode2??)>
<#if (where_and_eq_compatibleDepartmentCode2_value??)>
${prefixName?string('WHERE ', 'AND ')}E.compatible_department_code_2 = :where_and_eq_compatibleDepartmentCode2_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.compatible_department_code_2 IS NULL OR E.compatible_department_code_2 = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_compatibleParentCode1??)>
<#if (where_and_eq_compatibleParentCode1_value??)>
${prefixName?string('WHERE ', 'AND ')}E.compatible_parent_code_1 = :where_and_eq_compatibleParentCode1_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.compatible_parent_code_1 IS NULL OR E.compatible_parent_code_1 = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_compatibleParentCode2??)>
<#if (where_and_eq_compatibleParentCode2_value??)>
${prefixName?string('WHERE ', 'AND ')}E.compatible_parent_code_2 = :where_and_eq_compatibleParentCode2_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.compatible_parent_code_2 IS NULL OR E.compatible_parent_code_2 = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_createdByCode??)>
<#if (where_and_eq_createdByCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.created_by_code = :where_and_eq_createdByCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.created_by_code IS NULL OR E.created_by_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_createdById??)>
<#if (where_and_eq_createdById_value??)>
${prefixName?string('WHERE ', 'AND ')}E.created_by_id = :where_and_eq_createdById_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.created_by_id IS NULL OR E.created_by_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_createdDate??)>
<#if (where_and_eq_createdDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.created_date = :where_and_eq_createdDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.created_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_dataStateCode??)>
<#if (where_and_eq_dataStateCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.data_state_code = :where_and_eq_dataStateCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.data_state_code IS NULL OR E.data_state_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_departmentCode??)>
<#if (where_and_eq_departmentCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.department_code = :where_and_eq_departmentCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.department_code IS NULL OR E.department_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_departmentId??)>
<#if (where_and_eq_departmentId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.department_id = :where_and_eq_departmentId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.department_id IS NULL OR E.department_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_endDate??)>
<#if (where_and_eq_endDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.end_date = :where_and_eq_endDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.end_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_flagCode??)>
<#if (where_and_eq_flagCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.flag_code = :where_and_eq_flagCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.flag_code IS NULL OR E.flag_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_flagObjectCode??)>
<#if (where_and_eq_flagObjectCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.flag_object_code = :where_and_eq_flagObjectCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.flag_object_code IS NULL OR E.flag_object_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_jsonData??)>
<#if (where_and_eq_jsonData_value??)>
${prefixName?string('WHERE ', 'AND ')}E.json_data = :where_and_eq_jsonData_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.json_data IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastModifiedByCode??)>
<#if (where_and_eq_lastModifiedByCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_by_code = :where_and_eq_lastModifiedByCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.last_modified_by_code IS NULL OR E.last_modified_by_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastModifiedById??)>
<#if (where_and_eq_lastModifiedById_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_by_id = :where_and_eq_lastModifiedById_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.last_modified_by_id IS NULL OR E.last_modified_by_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastModifiedDate??)>
<#if (where_and_eq_lastModifiedDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_date = :where_and_eq_lastModifiedDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastSyncTime??)>
<#if (where_and_eq_lastSyncTime_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_sync_time = :where_and_eq_lastSyncTime_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.last_sync_time IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_name??)>
<#if (where_and_eq_name_value??)>
${prefixName?string('WHERE ', 'AND ')}E.name = :where_and_eq_name_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.name IS NULL OR E.name = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_orderBy??)>
<#if (where_and_eq_orderBy_value??)>
${prefixName?string('WHERE ', 'AND ')}E.order_by_ = :where_and_eq_orderBy_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.order_by_ IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_orgCode??)>
<#if (where_and_eq_orgCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.org_code = :where_and_eq_orgCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.org_code IS NULL OR E.org_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_orgId??)>
<#if (where_and_eq_orgId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.org_id = :where_and_eq_orgId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.org_id IS NULL OR E.org_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_parentCode??)>
<#if (where_and_eq_parentCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.parent_code = :where_and_eq_parentCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.parent_code IS NULL OR E.parent_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_parentId??)>
<#if (where_and_eq_parentId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.parent_id = :where_and_eq_parentId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.parent_id IS NULL OR E.parent_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_parentTreeCode??)>
<#if (where_and_eq_parentTreeCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.parent_tree_code = :where_and_eq_parentTreeCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.parent_tree_code IS NULL OR E.parent_tree_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_parentTreeId??)>
<#if (where_and_eq_parentTreeId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.parent_tree_id = :where_and_eq_parentTreeId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.parent_tree_id IS NULL OR E.parent_tree_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_parentTreeName??)>
<#if (where_and_eq_parentTreeName_value??)>
${prefixName?string('WHERE ', 'AND ')}E.parent_tree_name = :where_and_eq_parentTreeName_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.parent_tree_name IS NULL OR E.parent_tree_name = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_personalCode??)>
<#if (where_and_eq_personalCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.personal_code = :where_and_eq_personalCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.personal_code IS NULL OR E.personal_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_personalId??)>
<#if (where_and_eq_personalId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.personal_id = :where_and_eq_personalId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.personal_id IS NULL OR E.personal_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_provinceCode??)>
<#if (where_and_eq_provinceCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.province_code = :where_and_eq_provinceCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.province_code IS NULL OR E.province_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_regionCode??)>
<#if (where_and_eq_regionCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.region_code = :where_and_eq_regionCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.region_code IS NULL OR E.region_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_siteCode??)>
<#if (where_and_eq_siteCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.site_code = :where_and_eq_siteCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.site_code IS NULL OR E.site_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_sourceCode??)>
<#if (where_and_eq_sourceCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.source_code = :where_and_eq_sourceCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.source_code IS NULL OR E.source_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_stateCode??)>
<#if (where_and_eq_stateCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.state_code = :where_and_eq_stateCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.state_code IS NULL OR E.state_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_syncReturnCode??)>
<#if (where_and_eq_syncReturnCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.sync_return_code = :where_and_eq_syncReturnCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.sync_return_code IS NULL OR E.sync_return_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_syncReturnMessage??)>
<#if (where_and_eq_syncReturnMessage_value??)>
${prefixName?string('WHERE ', 'AND ')}E.sync_return_message = :where_and_eq_syncReturnMessage_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.sync_return_message IS NULL OR E.sync_return_message = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_systemInfoCode??)>
<#if (where_and_eq_systemInfoCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.system_info_code = :where_and_eq_systemInfoCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.system_info_code IS NULL OR E.system_info_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_thirdPartyCode??)>
<#if (where_and_eq_thirdPartyCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.third_party_code = :where_and_eq_thirdPartyCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.third_party_code IS NULL OR E.third_party_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_version??)>
<#if (where_and_eq_version_value??)>
${prefixName?string('WHERE ', 'AND ')}E.version_ = :where_and_eq_version_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.version_ IS NULL
</#if>
<#assign prefixName = false>
</#if>
))